package o;

import android.content.Context;
import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.updatesdk.service.otaupdate.UpdateStatusCode.DialogButton;
import java.lang.ref.WeakReference;

public class elg extends ekv implements ela {
    private eqn ˊ = new eqn(this) {
        final /* synthetic */ elg ˏ;

        {
            this.ˏ = r1;
        }

        public void onResult(int i) {
            if (202 == i) {
                this.ˏ.ॱ(this.ˏ.ˏ);
            }
            eqq.ˋ().ˊ("LoginProcessor");
        }
    };
    private WeakReference<Context> ˎ;

    static class e implements AccountBussinessListener {
        private e() {
        }

        public void onAccountBusinessResult(ccp o_ccp) {
            if (DialogButton.CONFIRM == o_ccp.ˎ) {
                eqq.ˋ().ˊ("LoginProcessor");
            }
            eoj.ˋ().ˊ("LoginProcessor");
        }
    }

    public elg(Context context) {
        this.ˎ = new WeakReference(context);
    }

    public void ॱ(Object obj) {
        this.ˏ = obj;
        UserSession instance = UserSession.getInstance();
        if (instance == null || !instance.isLoginSuccessful()) {
            eoj.ˋ().ˎ("LoginProcessor", new e());
            eqq.ˋ().ˎ("LoginProcessor", this.ˊ);
            eod.ॱ((Context) this.ˎ.get());
            return;
        }
        ela ˊ = ˊ();
        if (ˊ != null) {
            ˊ.ॱ(obj);
        }
    }
}
